using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Media;
using System.Windows;

namespace AgilePlannerDT.Data
{
    /// <summary>
    /// Collection of constants used throughout the application
    /// </summary>
    public class CardConstants
    {
        #region Colors

        public enum CardColors { white, red, pink, blue, green, yellow, peach, gray, aqua, khaki, transparent };

        public static readonly Color WHITE = Colors.White;
        public static readonly Color RED = Color.FromRgb(255, 99, 71);
        public static readonly Color PINK = Color.FromRgb(255, 192, 203);
        public static readonly Color BLUE = Color.FromRgb(173, 216, 230);
        public static readonly Color GREEN = Color.FromRgb(143, 188, 143);
        public static readonly Color YELLOW = Color.FromRgb(255, 246, 143);
        public static readonly Color PEACH = Color.FromRgb(255, 218, 185);
        public static readonly Color GRAY = Color.FromRgb(190, 190, 190);
        public static readonly Color AQUA = Color.FromRgb(102, 205, 170);
        public static readonly Color KHAKI = Color.FromRgb(189, 183, 107);
        public static readonly Color TRANSPARENT = Color.FromArgb(0, 0, 0, 0);
        //yellowgreen #FF9ACD32 Color.FromArgb(255, 154, 205, 50);
        public static readonly Color CARD_SELECTED_BORDER = Color.FromArgb(191, 154, 255, 0);
        public static readonly Color ITERATION_BACKGROUND = Color.FromArgb(191, 173, 216, 230);
        public static readonly Color STATUSAREA_BACKGROUND = Color.FromArgb(0, 10, 100, 40);

        public static Dictionary<string, Color> ColorList = new Dictionary<string, Color>(){
                                    {"white",WHITE},
                                    {"red",RED},
                                    {"pink",PINK},
                                    {"blue",BLUE},
                                    {"green",GREEN},
                                    {"yellow",YELLOW},
                                    {"peach", PEACH},
                                    {"gray",GRAY},
                                    {"aqua",AQUA},
                                    {"khaki",KHAKI},
                                    {"transparent",TRANSPARENT}
        };

  //      


        #endregion

        #region Status

        public static readonly string STATUS_DEFINED = "Defined";
        public static readonly string STATUS_IN_PROGRESS = "In Progress";
        public static readonly string STATUS_COMPLETED = "Completed";
        public static readonly string STATUS_ACCEPTED = "Accepted";

        public static readonly Color STATUS_DEFINED_COLOR = Colors.Khaki;
        public static readonly Color STATUS_IN_PROGRESS_COLOR = Colors.Orange;
        public static readonly Color STATUS_COMPLETED_COLOR = Colors.LimeGreen;
        public static readonly Color STATUS_ACCEPTED_COLOR = Colors.Blue;

        public static Dictionary<string,Color> StatusButtonColor= new Dictionary<string,Color>(){
                                    {STATUS_DEFINED,STATUS_DEFINED_COLOR},
                                    {STATUS_IN_PROGRESS,STATUS_IN_PROGRESS_COLOR},
                                    {STATUS_COMPLETED,STATUS_COMPLETED_COLOR},
                                    {STATUS_ACCEPTED,STATUS_ACCEPTED_COLOR}
        };
        #endregion

        #region Size
        //Edited 10.July.2008 to accomodate StateAreas.
        public static  double STORYCARD_DEFAULT_WIDTH = 300;
        public static  double STORYCARD_DEFAULT_HEIGHT = 150;
        public static  double ITERATION_DEFAULT_WIDTH = 400;
        public static  double ITERATION_DEFAULT_HEIGHT = 250;
        public static  double STATEAREA_DEFAULT_WIDTH = 400;
        public static  double STATEAREA_DEFAULT_HEIGHT = 400;
        public static  double BACKLOG_DEFAULT_WIDTH = 400;
        public static  double BACKLOG_DEFAULT_HEIGHT = 400;
        public static  double FLOATING_TOOLBOX_DEFAULT_WIDTH = 225;
        public static  double FLOATING_TOOLBOX_DEFAULT_HEIGHT = 225;
        public static  double TEXTAREA_DEFAULT_HEIGHT = 100;
        //editable variable
        public static double SCALE = 1;
        public static readonly double STORYCARD_HANDWRITING_ENLARGE_SCALE = 1.75;
        public static readonly double DEFAULT_MINIMIZED_CARD_HEIGHT = 66;
        #endregion

        #region Movement

        public static readonly double MIN_MOVEMENT_THRESHOLD = 3;
        public static readonly int NUM_RECENT_POINTS = 3;

        public static readonly double DECELERATION_CONSTANT = 5.5;
        public static readonly double DEFAULT_DECELERATION_RATIO = 1;
        public static readonly double CURRENT_FRICTION = 0.05;
        public static readonly double STATIC_FRICTION_COEFFICIENT = 5;
        public static readonly double TOSSING_CUTOFF = 5;

        public static readonly double FADING_DURATION = 750;

        public static readonly double COLOR_CHOSER_DIALOG_TIMER_DURATION = 1500;
        public static readonly Duration REORDER_ANIMATION_DURATION = TimeSpan.FromMilliseconds(1000);

        #endregion

        #region Defaults

        public static readonly double INDEXCARD_DEFAULT_LOCATION_X = 0;
        public static readonly double INDEXCARD_DEFAULT_LOCATION_Y = 0;

        public static readonly string STORYCARD_DEFAULT_NAME = "Default StoryCard";
        public static readonly string STORYCARD_DEFAULT_DESCRIPTION = "description";
        public static readonly string STORYCARD_DEFAULT_OWNER = "Owner";

        #endregion
    }
}